﻿@{
    ViewBag.Title = "NewsList";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
@section HeadScript {
    @*<script src="@Url.Content("~/Scripts/business/admin/NewsList.js")" type="text/javascript"></script>*@
    <script type="text/javascript">
        $(function () {
            $("#btnSave").click(function () {
                var validate = $("#tblAdd").form("validate");
                alert(validate);
                if (validate == false) {
                    return false;
                }
            });
        });
    </script>
}
<form id="form1">
    <table id="tblAdd">
        <tr>
            <td>名称1:</td>
            <td>
                <input class="easyui-validatebox" type="text" id="Realname1" name="Realname1" data-options="required:true,validType:'length[1,2]'" /><br />
            </td>
        </tr>
        <tr>
            <td>名称2:</td>
            <td>
                <input class="easyui-validatebox" type="text" id="Realname2" name="Realname2" data-options="required:true,validType:'length[1,4]'" /><br />
            </td>
        </tr>
        <tr>
            <td>名称3:</td>
            <td>
                <input class="easyui-validatebox" type="text" id="Realname3" name="Realname3" data-options="required:true,validType:'length[1,6]'" /><br />
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="button" id="btnSave" value="保存" /></td>
        </tr>
    </table>
</form>

